<?php
class Customer extends ActiveRecord\Model{

	static $belongs_to = array(
	array('gender','class_name'=>'gender'),
	array('statut','class_name'=>'statut'),
	array('lang','class_name'=>'lang'),
	array('contract','class_name'=>'statut')
	);



	public static function find_num_rows()
	{
		$array = self::first(array('select' => 'count(*) AS num_rows'))->attributes();

		return $array['num_rows'];
	}
}